package com.kangaroo.myhome.vo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @ClassName ResponseModel
 * @Description TODO
 * @Author kangaroo
 * @Date 2020/7/30 20:38
 * @Version 1.0
 **/
public class ResponseModel {

    public ResponseModel() {
        this.code = 200;
        this.message = "操作成功";
    }

    private int code;

    private String message;

    private Object data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public void setDataDataGrid(List lists, long count){
        Map result = new HashMap();
        result.put("rows",lists);
        result.put("total",count);
        this.setData(result);
    }

}
